package com.gao.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author gao
 * @time 2020/07/22 09:56:15
 */
@RestController
@RequestMapping("foo")
public class FooController {

    @RequestMapping("hello")
    public String hello(HttpServletRequest request) {
        System.out.println("realpath: " + request.getServletContext().getRealPath("/"));
        return "hello, foo";
    }
}
